<?php

    session_start();
    if(isset($_SESSION['usuario'])){
        $user = $_SESSION['usuario'];
        $_SESSION['usuario'] = $user;
    } else {
        header('Location: ../');
    }
    include_once '../Model/StepLogDao.php';
    include_once '../Model/NextStepDao.php';
    if(isset($_POST['data'])){
        $data = $_POST['data'];
        $d = explode(",",$data);
        $step[] = selectActualStep($d[0]);
        insertarLog($d[0],$step[0]['step'],$d[1],$user,$d[2]);
    }